<?php
class ValidateUtil {

    const USD_FORMAT = "USD";

     public static function isPrice(&$price,$currency = self::USD_FORMAT){
        if($currency == self::USD_FORMAT){
            if(is_numeric($price)){
                $price = sprintf("%.2f",($price));
                return true;
            }
            return false;
        }
        return false;
    }
}


//1.1
//0.1
//11,
$price = "100.9";
 ValidateUtil::isPrice($price);
    $price= str_replace(".", "", $price);
echo $price;